home *** CD-ROM | disk | FTP | other *** search
- /*Simple script to Send a note as a mail*/
-
- address 'blocnotes.rexx'
- options results
-
- /*********************ATTENTION**********************/
- /* MUST be definded envinronment variable SENDMAIL */
- /****************************************************/
-
- SENDMAIL=getvar('SENDMAIL')
-
- /****************************************************/
-
- /*Get the id of the note*/
-
- parse arg id .
-
- ISANOTE id
- if RESULT=1 then do /* Check if the id is valid*/
- GETLINE id 0
- ln=RESULT
- if pos('To:',ln)>0 then do
- export id 'T:msg'||id
- address command SENDMAIL||' T:msg'||id||' >t:ret'
- address command 'requestchoice TITLE Mail GADGETS Ok BODY "`type t:ret`"'
- address command 'delete T:msg'||id
- address command 'delete T:ret'
- end
- end
-
- exit
-
- getvar:
- filename='ENV:'||arg(1)
- call open('var',filename)
- string=readln('var')
- return string
-